<#ftl output_format="HTML" auto_esc=true>
<@h.siteCommonHead title="后台管理系统" keywords="开源,永久免费" description="springrain开源系统管理后台"/>
<script src="${ctx}/js/custom/common/form.js"></script>

<script>
	var _state;
	jQuery(function(){ 
		_state="${(returnDatas.queryBean.active)!''}";
		jQuery("#active").val(_state);
		/*
		全选、反选
		*/
		jQuery("#checkAll").bind('click',function(){
			var _is_check=jQuery(this).get(0).checked;
			jQuery("input[name='check_li']").each(function(_i,_o){
				jQuery(_o).get(0).checked=_is_check;
			});
		});
	});
	function del(_id){
		springrain.mydelete(_id,"${ctx}/s/peacemap/${siteId!''}/${bussinissId!''}/delete");
	}
	function delMore(){
		 springrain.mydeletemore("","${ctx}/s/peacemap/${siteId!''}/${bussinissId!''}/delete/more");
	}
</script>

</head>
<body>
	<div class="layui-layout layui-layout-admin">
		<@h.naviHeader /><@h.leftMenu />
			<!-- 主体内容开始 -->
			<div class="layui-tab layui-tab-brief">
				<ul class="layui-tab-title site-demo-title">
		             <!-- <li class="layui-this">
		             		<i class="layui-icon">&#xe630;</i>
							网站地图导航
		             		<span class="layui-breadcrumb" style="visibility: visible;">
							  <a href="${ctx}">首页<span class="layui-box">&gt;</span></a>
							  <a><cite>地图管理</cite></a>
							</span>
		             </li> -->
					 <li style="float:right;">
		             	<@shiro.hasPermission name="/s/peacemap/${siteId!''}/${bussinissId!''}/update" >
		             		<button type="button"   class="layui-btn layui-btn-small" data-action="${ctx}/s/peacemap/${siteId!''}/${bussinissId!''}/update/pre"><i class="layui-icon layui-icon-specil">&#xe61f;</i>新增</button>
		             	</@shiro.hasPermission>
		             	<!-- <@shiro.hasPermission name="/s/${siteId!''}/${bussinissId!''}/${categoryId!''}/list/export" >
				        	<button type="button"   class="layui-btn layui-btn-small"><i class="layui-icon layui-icon-specil">&#xe609;</i>导出</button>
				        </@shiro.hasPermission>
		                <button type="button"  class="layui-btn layui-btn-warm layui-btn-small"><i class="layui-icon layui-icon-specil">&#xe601;</i>导入</button> -->
		                <@shiro.hasPermission name="/s/peacemap/${siteId!''}/${bussinissId!''}/delete/more" >
		               		 <button type="button" onclick="delMore()" class="layui-btn layui-btn-danger layui-btn-small"><i class="layui-icon">&#xe640;</i>批量删除</button>
		                </@shiro.hasPermission>
		             </li>
	       		</ul>
				
				<div class="layui-body layui-tab-content site-demo-body">
					<div class="layui-tab-item layui-show">
							<div class="layui-main">
						          <div id="LAY_preview">
						          <!-- 查询  开始 -->
							          <form class="layui-form layui-form-pane" id="searchForm" action="${ctx}/s/peacemap/${siteId!''}/${bussinissId!''}/list" method="post">
							          <input type="hidden" name="pageIndex" id="pageIndex" value="${(returnDatas.page.pageIndex)!'1'}" /> 
							          <input type="hidden" name="sort" id="page_sort" value="${(returnDatas.page.sort)!'desc'}" />
							          <input type="hidden" name="order" id="page_order" value="${(returnDatas.page.order)!'id'}" />
									  <table class="layui-table search-wrap">
									  	<colgroup>
										    <col width="">
										    <col width="150">
										</colgroup>
							          	<tbody>
							          		<tr>
							          			<th colspan="2">搜索</th>
							          		</tr>
							          		<tr>
							          			<td>
							          				<div class="layui-inline">
									                    <label class="layui-form-label">名称</label>
									                    <div class="layui-input-inline">
									                           <input type="text" name="name" value="${(returnDatas.queryBean.name)!''}" placeholder="请输入名称 " class="layui-input">
									                    </div>
							                		</div>
									                 <!-- <div class="layui-inline">
									                    <label class="layui-form-label">是否可用</label>
									                    <div class="layui-input-inline">
									                        <select name="active" id="active" class="layui-input">
									                          <option value="">==请选择==</option>
															  <option value="1">是</option>
															  <option value="0">否</option>
															</select>   
									                    </div>
									                </div> -->
							          			</td>
							          			<td>
							          			   <div class="layui-inline">
									                    <button class="layui-btn" type="button" onclick="springrain.commonSubmit('searchForm');"><i class="layui-icon" style="top:4px;right:5px;">&#xe615;</i>搜索</button>
									                </div>
							          			</td>
							          		</tr>
							          	</tbody>
							          </table>
									  <!-- 查询  结束 -->
									</form>
									<!--start_export-->
									<table class="layui-table" lay-even>
										  <colgroup>
										    <col width="40">
										    <col width="120">
										    <col>
										  </colgroup>
										  <!--end_no_export-->
										  <!--first_start_export-->
											<thead>
												<tr>
													<th colspan="9">地图列表<font id='recordsView' class='recorsView'>共<span></span>页,共 <span></span>条记录</font></th>
												</tr>
												<tr>
												  <!--first_start_no_export-->
												  <th class="center">
															<input id="checkAll"  type="checkbox">
												  </th>
												  <th>操作</th>
												  <!--first_end_no_export-->
														<th id="th_name" >地点名称</th>
														<th id="th_city" >地点所在市</th>
														<!-- <th id="th_district" >所在区</th> -->
														<th id="th_tel" >电话号码</th>
														<th id="th_poiaddress" >地点详细地址</th>
														<th id="th_lat" >纬度</th>
														<th id="th_lng" >经度</th>
												</tr> 
											</thead>
										  <!--first_end_export-->
										  <!--start_export-->
										   <tbody>
										   <@cms_peace_map_list page=(returnDatas.page)! siteId=(siteId)! bussinissId=(bussinissId)! name=(name)!>
										    <#if (peacemaplist??)&&(peacemaplist?size>0)> 
										    	<#list	peacemaplist as _data>
										    		<!--start_no_export-->
													<tr class="">
														<td class="center">
																<input name="check_li" value="${_data.id}"  type="checkbox">
														</td>
														<td>
															<@shiro.hasPermission name="/s/peacemap/${siteId!''}/${bussinissId!''}/update" >
								                           		 <a href="#" data-action="${ctx}/s/peacemap/${siteId!''}/${bussinissId!''}/update/pre?id=${(_data.id)!''}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
								                            </@shiro.hasPermission>
								                            <@shiro.hasPermission name="/s/peacemap/${siteId!''}/${bussinissId!''}/delete" >
								                            	<a href="javascript:del('${(_data.id)!''}')" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
								                            </@shiro.hasPermission>
														</td>
														<!--end_no_export-->
														<td >
															${(_data.name)!''}
														</td>
														<td >
															${(_data.city)!''}
														</td>
														<!-- <td >
															${(_data.district)!''}
														</td> -->
														<td >
															${(_data.tel)!''}
														</td>
														<td >
															${(_data.poiaddress)!''}
														</td>
														<td >
															${(_data.lat)!''}
														</td>
														<td >
															${(_data.lng)!''}
														</td>
													</tr>
												</#list>
											 </#if>
											 </@cms_peace_map_list>
											</tbody>
										</table>
									<#if returnDatas.page??> 
										<div id='laypageDiv'></div>
										<@h.layPage page=returnDatas.page /> 
									</#if>
								</div>
							</div>
						</div>
				</div>
			</div>
		<!-- 主体内容结束 -->
		<@h.footer />
	</div>
</body>
</html>

